package org.example.Server.utils;

/**
 * @description: 异常处理枚举类
 * @author: Junny
 * @date: 2024/6/11
 * @version: v1.0
 * @update:
 */
public enum ExceptionEnum implements BaseInfoInterface {
    //    成功类别   S：请求成功 A:数据错误 B:服务器错误
    SUCCESS("S0000", "请求成功!"),
    BODY_NOT_MATCH("A1000", "数据参数错误！"),
    SIGNATURE_ERROR("A1001", "签名错误"),
    TOKEN_EXPIRED("A1002", "Token过期"),
    ALGO_ERROR("A1003", "算法错误"),
    TOKEN_ERROR("A1004", "TOKEN_ERROR"),
    LOGIN_ERROR("A1005", "登录失败！手机号或密码错误！"),
    USER_EXIST("A1006", "用户已存在！"),
    USER_NOTEXIST("A1007", "用户不存在！"),
    USER_NUMEXIST("A1008", "学号已存在！"),
    SQL_ERROR("A1009", "数据库错误！"),
    NOT_LOGIN("A1010", "NOT_LOGIN"),
    FFMPEG_ERROR("A1011", "ffmpeg错误！");


    private final String resultCode;


    private final String resultMsg;

    ExceptionEnum(String resultCode, String resultMsg) {
        this.resultCode = resultCode;
        this.resultMsg = resultMsg;
    }

    @Override
    public String getResultCode() {
        return resultCode;
    }

    @Override
    public String getResultMsg() {
        return resultMsg;
    }
}
